package com.hongye.app.model;

import com.jfinal.plugin.activerecord.Model;

public class FavoriteModel extends Model<FavoriteModel>{
	
	private static final long serialVersionUID =  -5317310510318889388L;
	
	public static final FavoriteModel dao = new FavoriteModel();
	
	/**
	 * 获取某人的被关注的数量
	 * @author liushaomin
	 * 2017年3月14日
	 * @param phone
	 * @return
	 */
	public static int getFavoriteSize(String phone){
		String sql = "select * from favorite where to_phone = '"+ phone +"'";
		return dao.find(sql).size();
	}
}
